<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <div id="app"></div>
    <template id="my-app">
        <div>
            <h1>220010104505-李应昊</h1>
            <p>手机品牌:{{name}}</p >
            <botton @click='change'>点击更换品牌</botton>
        </div>

    </template>
    <script>
        Vue.createApp({
            template: `#my-app`,
            data() {
                return {
                    name: "华为"
                }
            },
            methods: {
                change() {
                    if (this.name == "小米") {
                        this.name = "华为"
                    } else {
                        this.name = "小米"
                    }

                }
            }
        }).mount('#app')
    </script>
</body>

</html>